#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 */
scalar_t__ bmi();
scalar_t__ bne();
int /*<<< orphan*/ dex();
int /*<<< orphan*/ jsr_cout1();
int /*<<< orphan*/ jsr_crout();
int /*<<< orphan*/ jsr_inc_pointer();
int /*<<< orphan*/ jsr_prblnk();
int /*<<< orphan*/ jsr_reset_output();
int /*<<< orphan*/ jsr_strlen();
int /*<<< orphan*/ lda(int, int);
int /*<<< orphan*/ ldx(int, int);
int /*<<< orphan*/ lsr(int, int);
int /*<<< orphan*/ sbc(int, int);
int /*<<< orphan*/ sec();
int /*<<< orphan*/ tax();
void jsr_center_and_print() {
  jsr_strlen();
  sec();
  lda(0, 40);
  sbc(1, 0xf4);
  if (bmi())
    goto no_center;
  lsr(3, 1);
  tax();
  jsr_prblnk();
  jsr_reset_output();
no_center:
  ldx(1, 0xf4);
print_loop:
  lda(2, 0xfc);
  jsr_cout1();
  jsr_inc_pointer();
  dex();
  if (bne())
    goto print_loop;
  jsr_crout();
}


x86 assembly (clang, -O0):
<jsr_center_and_print>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1080 <jsr_strlen@plt>
mov    $0x0,%al
call   10a0 <sec@plt>
xor    %edi,%edi
mov    $0x28,%esi
call   1100 <lda@plt>
mov    $0x1,%edi
mov    $0xf4,%esi
call   1070 <sbc@plt>
mov    $0x0,%al
call   1050 <bmi@plt>
cmp    $0x0,%rax
je     1233 <jsr_center_and_print+0x43>
jmp    1257 <jsr_center_and_print+0x67>
mov    $0x3,%edi
mov    $0x1,%esi
call   10d0 <lsr@plt>
mov    $0x0,%al
call   10e0 <tax@plt>
mov    $0x0,%al
call   1030 <jsr_prblnk@plt>
mov    $0x0,%al
call   1110 <jsr_reset_output@plt>
mov    $0x1,%edi
mov    $0xf4,%esi
call   1090 <ldx@plt>
mov    $0x2,%edi
mov    $0xfc,%esi
call   1100 <lda@plt>
mov    $0x0,%al
call   1040 <jsr_cout1@plt>
mov    $0x0,%al
call   10b0 <jsr_inc_pointer@plt>
mov    $0x0,%al
call   10c0 <dex@plt>
mov    $0x0,%al
call   1060 <bne@plt>
cmp    $0x0,%rax
je     12a0 <jsr_center_and_print+0xb0>
jmp    1266 <jsr_center_and_print+0x76>
mov    $0x0,%al
call   10f0 <jsr_crout@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<jsr_center_and_print>:
push   %rax
xor    %eax,%eax
call   1080 <jsr_strlen@plt>
xor    %eax,%eax
call   10a0 <sec@plt>
xor    %edi,%edi
mov    $0x28,%esi
call   1100 <lda@plt>
mov    $0x1,%edi
mov    $0xf4,%esi
call   1070 <sbc@plt>
xor    %eax,%eax
call   1050 <bmi@plt>
test   %rax,%rax
jne    124a <jsr_center_and_print+0x5a>
mov    $0x3,%edi
mov    $0x1,%esi
call   10d0 <lsr@plt>
xor    %eax,%eax
call   10e0 <tax@plt>
xor    %eax,%eax
call   1030 <jsr_prblnk@plt>
xor    %eax,%eax
call   1110 <jsr_reset_output@plt>
mov    $0x1,%edi
mov    $0xf4,%esi
call   1090 <ldx@plt>
nopl   0x0(%rax)
mov    $0x2,%edi
mov    $0xfc,%esi
call   1100 <lda@plt>
xor    %eax,%eax
call   1040 <jsr_cout1@plt>
xor    %eax,%eax
call   10b0 <jsr_inc_pointer@plt>
xor    %eax,%eax
call   10c0 <dex@plt>
xor    %eax,%eax
call   1060 <bne@plt>
test   %rax,%rax
jne    1260 <jsr_center_and_print+0x70>
xor    %eax,%eax
pop    %rcx
jmp    10f0 <jsr_crout@plt>

LLVM IR (-O0):
define void @jsr_center_and_print() {
%1 = call i32 (...) @jsr_strlen()
%2 = call i32 (...) @sec()
%3 = call i32 @lda(i32 0, i32 40)
%4 = call i32 @sbc(i32 1, i32 244)
%5 = call i64 (...) @bmi()
%6 = icmp ne i64 %5, 0
br i1 %6, label %7, label %8
7: ; preds = %0
br label %13
8: ; preds = %0
%9 = call i32 @lsr(i32 3, i32 1)
%10 = call i32 (...) @tax()
%11 = call i32 (...) @jsr_prblnk()
%12 = call i32 (...) @jsr_reset_output()
br label %13
13: ; preds = %8, %7
%14 = call i32 @ldx(i32 1, i32 244)
br label %15
15: ; preds = %22, %13
%16 = call i32 @lda(i32 2, i32 252)
%17 = call i32 (...) @jsr_cout1()
%18 = call i32 (...) @jsr_inc_pointer()
%19 = call i32 (...) @dex()
%20 = call i64 (...) @bne()
%21 = icmp ne i64 %20, 0
br i1 %21, label %22, label %23
22: ; preds = %15
br label %15
23: ; preds = %15
%24 = call i32 (...) @jsr_crout()
ret void
}

LLVM IR (-O2):
define void @jsr_center_and_print() {
%1 = tail call i32 (...) @jsr_strlen()
%2 = tail call i32 (...) @sec()
%3 = tail call i32 @lda(i32 0, i32 40)
%4 = tail call i32 @sbc(i32 1, i32 244)
%5 = tail call i64 (...) @bmi()
%6 = icmp eq i64 %5, 0
br i1 %6, label %7, label %12
7: ; preds = %0
%8 = tail call i32 @lsr(i32 3, i32 1)
%9 = tail call i32 (...) @tax()
%10 = tail call i32 (...) @jsr_prblnk()
%11 = tail call i32 (...) @jsr_reset_output()
br label %12
12: ; preds = %0, %7
%13 = tail call i32 @ldx(i32 1, i32 244)
br label %14
14: ; preds = %14, %12
%15 = tail call i32 @lda(i32 2, i32 252)
%16 = tail call i32 (...) @jsr_cout1()
%17 = tail call i32 (...) @jsr_inc_pointer()
%18 = tail call i32 (...) @dex()
%19 = tail call i64 (...) @bne()
%20 = icmp eq i64 %19, 0
br i1 %20, label %21, label %14
21: ; preds = %14
%22 = tail call i32 (...) @jsr_crout()
ret void
}