#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, int);
int m91(int n) {
  if (n > 100) {
    printf("M91(%d) since %d is > 100\n", n - 10, n);
    return n - 10;
  } else {
    printf("M91(M91(%d)) since %d <= 100\n", n + 11, n);
    return m91(m91(n + 11));
  }
}


x86 assembly (clang, -O0):
<m91>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
cmpl   $0x64,-0x8(%rbp)
jle    1158 <m91+0x38>
mov    -0x8(%rbp),%esi
sub    $0xa,%esi
mov    -0x8(%rbp),%edx
lea    0xebb(%rip),%rdi
call   1030 <printf@plt>
mov    -0x8(%rbp),%eax
sub    $0xa,%eax
mov    %eax,-0x4(%rbp)
jmp    1182 <m91+0x62>
mov    -0x8(%rbp),%esi
add    $0xb,%esi
mov    -0x8(%rbp),%edx
lea    0xeb3(%rip),%rdi
call   1030 <printf@plt>
mov    -0x8(%rbp),%edi
add    $0xb,%edi
call   1040 <m91@plt>
mov    %eax,%edi
call   1040 <m91@plt>
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<m91>:
push   %rbp
push   %rbx
push   %rax
mov    %edi,%eax
cmp    $0x64,%edi
jg     115b <m91+0x3b>
lea    0xeea(%rip),%rbx
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
lea    0xb(%rax),%ebp
mov    %rbx,%rdi
mov    %ebp,%esi
mov    %eax,%edx
call   1030 <printf@plt>
mov    %ebp,%edi
call   1040 <m91@plt>
cmp    $0x64,%eax
jbe    1140 <m91+0x20>
lea    -0xa(%rax),%ebx
lea    0xe9b(%rip),%rdi
mov    %ebx,%esi
mov    %eax,%edx
call   1030 <printf@plt>
mov    %ebx,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
@.str = [27 x i8] c"M91(%d) since %d is > 100\0A\00"
@.str.1 = [30 x i8] c"M91(M91(%d)) since %d <= 100\0A\00"
define i32 @m91(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %3
%4 = load i32, i32* %3
%5 = icmp sgt i32 %4, 100
br i1 %5, label %6, label %13
6: ; preds = %1
%7 = load i32, i32* %3
%8 = sub nsw i32 %7, 10
%9 = load i32, i32* %3
%10 = call i32 @printf(i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str, i64 0, i64 0), i32 %8, i32 %9)
%11 = load i32, i32* %3
%12 = sub nsw i32 %11, 10
store i32 %12, i32* %2
br label %22
13: ; preds = %1
%14 = load i32, i32* %3
%15 = add nsw i32 %14, 11
%16 = load i32, i32* %3
%17 = call i32 @printf(i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.1, i64 0, i64 0), i32 %15, i32 %16)
%18 = load i32, i32* %3
%19 = add nsw i32 %18, 11
%20 = call i32 @m91(i32 %19)
%21 = call i32 @m91(i32 %20)
store i32 %21, i32* %2
br label %22
22: ; preds = %13, %6
%23 = load i32, i32* %2
ret i32 %23
}

LLVM IR (-O2):
@.str = [27 x i8] c"M91(%d) since %d is > 100\0A\00"
@.str.1 = [30 x i8] c"M91(M91(%d)) since %d <= 100\0A\00"
define i32 @m91(i32 %0) {
%2 = icmp sgt i32 %0, 100
br i1 %2, label %3, label %7
3: ; preds = %7, %1
%4 = phi i32 [ %0, %1 ], [ %11, %7 ]
%5 = add nsw i32 %4, -10
%6 = tail call i32 @printf(i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str, i64 0, i64 0), i32 %5, i32 %4)
ret i32 %5
7: ; preds = %1, %7
%8 = phi i32 [ %11, %7 ], [ %0, %1 ]
%9 = add nsw i32 %8, 11
%10 = tail call i32 @printf(i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.1, i64 0, i64 0), i32 %9, i32 %8)
%11 = tail call i32 @m91(i32 %9)
%12 = icmp ugt i32 %11, 100
br i1 %12, label %3, label %7
}