#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*/ putchar(char);
char tolower(char volatile);
int asdfasdf(int x, int y) {
  int i = x;
  volatile char str[] = "some STRING goes HERE";
  putchar(tolower(str[y]));
  i++;
  putchar('\n');
  return asdfasdf(i, x * 2);
}


x86 assembly (clang, -O0):
<asdfasdf>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%eax
mov    %eax,-0xc(%rbp)
lea    -0x30(%rbp),%rax
mov    0xec5(%rip),%cx
mov    %cx,0x14(%rax)
mov    0xeb7(%rip),%ecx
mov    %ecx,0x10(%rax)
movaps 0xe9d(%rip),%xmm0
movaps %xmm0,(%rax)
movslq -0x8(%rbp),%rax
mov    -0x30(%rbp,%rax,1),%al
movsbl %al,%edi
call   1040 <tolower@plt>
movsbl %al,%edi
call   1030 <putchar@plt>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
mov    $0xa,%edi
call   1030 <putchar@plt>
mov    -0xc(%rbp),%edi
mov    -0x4(%rbp),%esi
shl    $0x1,%esi
call   1050 <asdfasdf@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<asdfasdf>:
push   %rbx
sub    $0x20,%rsp
add    %edi,%edi
nopw   0x0(%rax,%rax,1)
mov    %edi,%ebx
movzwl 0xedb(%rip),%eax
mov    %ax,0x14(%rsp)
mov    0xecc(%rip),%eax
mov    %eax,0x10(%rsp)
movaps 0xeb1(%rip),%xmm0
movaps %xmm0,(%rsp)
movslq %esi,%rax
movsbl (%rsp,%rax,1),%edi
call   1040 <tolower@plt>
movsbl %al,%edi
call   1030 <putchar@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
lea    0x2(%rbx),%edi
mov    %ebx,%esi
jmp    1130 <asdfasdf+0x10>

LLVM IR (-O0):
@__const.asdfasdf.str = [22 x i8] c"some STRING goes HERE\00"
define i32 @asdfasdf(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
%6 = alloca [22 x i8]
store i32 %0, i32* %3
store i32 %1, i32* %4
%7 = load i32, i32* %3
store i32 %7, i32* %5
%8 = bitcast [22 x i8]* %6 to i8*
%9 = load i32, i32* %4
%10 = sext i32 %9 to i64
%11 = getelementptr inbounds [22 x i8], [22 x i8]* %6, i64 0, i64 %10
%12 = load volatile i8, i8* %11
%13 = call signext i8 @tolower(i8 signext %12)
%14 = call i32 @putchar(i8 signext %13)
%15 = load i32, i32* %5
%16 = add nsw i32 %15, 1
store i32 %16, i32* %5
%17 = call i32 @putchar(i8 signext 10)
%18 = load i32, i32* %5
%19 = load i32, i32* %3
%20 = mul nsw i32 %19, 2
%21 = call i32 @asdfasdf(i32 %18, i32 %20)
ret i32 %21
}

LLVM IR (-O2):
@__const.asdfasdf.str = [22 x i8] c"some STRING goes HERE\00"
define i32 @asdfasdf(i32 %0, i32 %1) {
%3 = alloca [22 x i8]
%4 = getelementptr inbounds [22 x i8], [22 x i8]* %3, i64 0, i64 0
br label %5
5: ; preds = %5, %2
%6 = phi i32 [ %0, %2 ], [ %13, %5 ]
%7 = phi i32 [ %1, %2 ], [ %15, %5 ]
%8 = sext i32 %7 to i64
%9 = getelementptr inbounds [22 x i8], [22 x i8]* %3, i64 0, i64 %8
%10 = load volatile i8, i8* %9
%11 = tail call signext i8 @tolower(i8 signext %10)
%12 = tail call i32 @putchar(i8 signext %11)
%13 = add nsw i32 %6, 1
%14 = tail call i32 @putchar(i8 signext 10)
%15 = shl nsw i32 %6, 1
br label %5
}