#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*/ test_ralign(char *, int);
int main(int argc, const char *argv[]) {
  test_ralign("Hello! This is a test!\n"
              "Here's a blank line:\n"
              "\n"
              "And short\n"
              "q",
              40);
  test_ralign("Hello! This is a test!\n"
              "Here's a blank line:\n"
              "\n"
              "And short\n"
              "q",
              30);
  test_ralign("Hello! This is a test!\n"
              "Here's a blank line:\n"
              "\n"
              "And short\n"
              "q",
              10);
  test_ralign("Hello! This is a test!\n"
              "Here's a blank line:\n"
              "\n"
              "And short\n"
              "q",
              0);
  test_ralign("Hello! This is a test!\n"
              "Here's a blank line:\n"
              "\n"
              "And short\n"
              "Here's a blank line:\n"
              "\n"
              "And short\n"
              "q",
              18);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
lea    0xed3(%rip),%rdi
mov    $0x28,%esi
call   1030 <test_ralign@plt>
lea    0xec2(%rip),%rdi
mov    $0x1e,%esi
call   1030 <test_ralign@plt>
lea    0xeb1(%rip),%rdi
mov    $0xa,%esi
call   1030 <test_ralign@plt>
lea    0xea0(%rip),%rdi
xor    %esi,%esi
call   1030 <test_ralign@plt>
lea    0xecb(%rip),%rdi
mov    $0x12,%esi
call   1030 <test_ralign@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
lea    0xee8(%rip),%rbx
mov    %rbx,%rdi
mov    $0x28,%esi
call   1030 <test_ralign@plt>
mov    %rbx,%rdi
mov    $0x1e,%esi
call   1030 <test_ralign@plt>
mov    %rbx,%rdi
mov    $0xa,%esi
call   1030 <test_ralign@plt>
mov    %rbx,%rdi
xor    %esi,%esi
call   1030 <test_ralign@plt>
lea    0xee9(%rip),%rdi
mov    $0x12,%esi
call   1030 <test_ralign@plt>
xor    %eax,%eax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [57 x i8] c"Hello! This is a test!\0AHere's a blank line:\0A\0AAnd short\0Aq\00"
@.str.1 = [89 x i8] c"Hello! This is a test!\0AHere's a blank line:\0A\0AAnd short\0AHere's a blank line:\0A\0AAnd short\0Aq\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%6 = call i32 @test_ralign(i8* getelementptr inbounds ([57 x i8], [57 x i8]* @.str, i64 0, i64 0), i32 40)
%7 = call i32 @test_ralign(i8* getelementptr inbounds ([57 x i8], [57 x i8]* @.str, i64 0, i64 0), i32 30)
%8 = call i32 @test_ralign(i8* getelementptr inbounds ([57 x i8], [57 x i8]* @.str, i64 0, i64 0), i32 10)
%9 = call i32 @test_ralign(i8* getelementptr inbounds ([57 x i8], [57 x i8]* @.str, i64 0, i64 0), i32 0)
%10 = call i32 @test_ralign(i8* getelementptr inbounds ([89 x i8], [89 x i8]* @.str.1, i64 0, i64 0), i32 18)
ret i32 0
}

LLVM IR (-O2):
@.str = [57 x i8] c"Hello! This is a test!\0AHere's a blank line:\0A\0AAnd short\0Aq\00"
@.str.1 = [89 x i8] c"Hello! This is a test!\0AHere's a blank line:\0A\0AAnd short\0AHere's a blank line:\0A\0AAnd short\0Aq\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 @test_ralign(i8* getelementptr inbounds ([57 x i8], [57 x i8]* @.str, i64 0, i64 0), i32 40)
%4 = tail call i32 @test_ralign(i8* getelementptr inbounds ([57 x i8], [57 x i8]* @.str, i64 0, i64 0), i32 30)
%5 = tail call i32 @test_ralign(i8* getelementptr inbounds ([57 x i8], [57 x i8]* @.str, i64 0, i64 0), i32 10)
%6 = tail call i32 @test_ralign(i8* getelementptr inbounds ([57 x i8], [57 x i8]* @.str, i64 0, i64 0), i32 0)
%7 = tail call i32 @test_ralign(i8* getelementptr inbounds ([89 x i8], [89 x i8]* @.str.1, i64 0, i64 0), i32 18)
ret i32 0
}