#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 tm {
  int dummy;
};

/* Variables and functions */
int printf(char *);
int /*<<< orphan*/ putchar(char);
int /*<<< orphan*/ strftime(char *, int, char *, struct tm *);
void print_month_and_year(struct tm *new_date) {
  char string[500];
  int chars_printed;
  strftime(string, 500, "\n%B %Y\n", new_date);
  chars_printed = printf(string);
  for (; chars_printed > 1; chars_printed--)
    putchar('=');
  printf("\n");
}


x86 assembly (clang, -O0):
<print_month_and_year>:
push   %rbp
mov    %rsp,%rbp
sub    $0x210,%rsp
mov    %rdi,-0x8(%rbp)
lea    -0x200(%rbp),%rdi
mov    -0x8(%rbp),%rcx
mov    $0x1f4,%esi
lea    0xeaa(%rip),%rdx
call   1050 <strftime@plt>
lea    -0x200(%rbp),%rdi
call   1040 <printf@plt>
mov    %eax,-0x204(%rbp)
cmpl   $0x1,-0x204(%rbp)
jle    1198 <print_month_and_year+0x68>
mov    $0x3d,%edi
call   1030 <putchar@plt>
mov    -0x204(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0x204(%rbp)
jmp    116d <print_month_and_year+0x3d>
lea    0xe67(%rip),%rdi
call   1040 <printf@plt>
add    $0x210,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<print_month_and_year>:
push   %rbx
sub    $0x200,%rsp
mov    %rdi,%rcx
lea    0xebe(%rip),%rdx
mov    %rsp,%rbx
mov    %rbx,%rdi
mov    $0x1f4,%esi
call   1050 <strftime@plt>
mov    %rbx,%rdi
call   1040 <printf@plt>
cmp    $0x2,%eax
jl     1182 <print_month_and_year+0x52>
mov    %eax,%ebx
add    $0x1,%ebx
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
mov    $0x3d,%edi
call   1030 <putchar@plt>
add    $0xffffffff,%ebx
cmp    $0x2,%ebx
ja     1170 <print_month_and_year+0x40>
mov    $0xa,%edi
call   1030 <putchar@plt>
add    $0x200,%rsp
pop    %rbx
ret

LLVM IR (-O0):
%struct.tm = type { i32 }
@.str = [8 x i8] c"\0A%B %Y\0A\00"
@.str.1 = [2 x i8] c"\0A\00"
define void @print_month_and_year(%struct.tm* %0) {
%2 = alloca %struct.tm*
%3 = alloca [500 x i8]
%4 = alloca i32
store %struct.tm* %0, %struct.tm** %2
%5 = getelementptr inbounds [500 x i8], [500 x i8]* %3, i64 0, i64 0
%6 = load %struct.tm*, %struct.tm** %2
%7 = call i32 @strftime(i8* %5, i32 500, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), %struct.tm* %6)
%8 = getelementptr inbounds [500 x i8], [500 x i8]* %3, i64 0, i64 0
%9 = call i32 @printf(i8* %8)
store i32 %9, i32* %4
br label %10
10: ; preds = %15, %1
%11 = load i32, i32* %4
%12 = icmp sgt i32 %11, 1
br i1 %12, label %13, label %18
13: ; preds = %10
%14 = call i32 @putchar(i8 signext 61)
br label %15
15: ; preds = %13
%16 = load i32, i32* %4
%17 = add nsw i32 %16, -1
store i32 %17, i32* %4
br label %10
18: ; preds = %10
%19 = call i32 @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
%struct.tm = type { i32 }
@.str = [8 x i8] c"\0A%B %Y\0A\00"
define void @print_month_and_year(%struct.tm* %0) {
%2 = alloca [500 x i8]
%3 = getelementptr inbounds [500 x i8], [500 x i8]* %2, i64 0, i64 0
%4 = call i32 @strftime(i8* %3, i32 500, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), %struct.tm* %0)
%5 = call i32 @printf(i8* %3)
%6 = icmp sgt i32 %5, 1
br i1 %6, label %7, label %12
7: ; preds = %1, %7
%8 = phi i32 [ %10, %7 ], [ %5, %1 ]
%9 = call i32 @putchar(i8 signext 61)
%10 = add nsw i32 %8, -1
%11 = icmp ugt i32 %8, 2
br i1 %11, label %7, label %12
12: ; preds = %7, %1
%13 = call i32 bitcast (i32 (i8)* @putchar to i32 (i32)*)(i32 10)
ret void
}