#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 */
unsigned int __ibm440eplike_fixup_clocks(unsigned int, unsigned int, int);
int /*<<< orphan*/ eplike_fixup_uart_clk(int, char *, unsigned int,
                                         unsigned int);
void ibm440spe_fixup_clocks(unsigned int sys_clk, unsigned int ser_clk,
                            unsigned int tmr_clk) {
  unsigned int plb_clk = __ibm440eplike_fixup_clocks(sys_clk, tmr_clk, 1);
  eplike_fixup_uart_clk(0, "/plb/opb/serial@f0000200", ser_clk, plb_clk);
  eplike_fixup_uart_clk(1, "/plb/opb/serial@f0000300", ser_clk, plb_clk);
  eplike_fixup_uart_clk(2, "/plb/opb/serial@f0000600", ser_clk, plb_clk);
}


x86 assembly (clang, -O0):
<ibm440spe_fixup_clocks>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    -0x4(%rbp),%edi
mov    -0xc(%rbp),%esi
mov    $0x1,%edx
call   1030 <__ibm440eplike_fixup_clocks@plt>
mov    %eax,-0x10(%rbp)
mov    -0x8(%rbp),%edx
mov    -0x10(%rbp),%ecx
xor    %edi,%edi
lea    0xead(%rip),%rsi
call   1040 <eplike_fixup_uart_clk@plt>
mov    -0x8(%rbp),%edx
mov    -0x10(%rbp),%ecx
mov    $0x1,%edi
lea    0xeaf(%rip),%rsi
call   1040 <eplike_fixup_uart_clk@plt>
mov    -0x8(%rbp),%edx
mov    -0x10(%rbp),%ecx
mov    $0x2,%edi
lea    0xeb1(%rip),%rsi
call   1040 <eplike_fixup_uart_clk@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ibm440spe_fixup_clocks>:
push   %rbp
push   %rbx
push   %rax
mov    %esi,%ebx
mov    %edx,%esi
mov    $0x1,%edx
call   1030 <__ibm440eplike_fixup_clocks@plt>
mov    %eax,%ebp
lea    0xec6(%rip),%rsi
xor    %edi,%edi
mov    %ebx,%edx
mov    %eax,%ecx
call   1040 <eplike_fixup_uart_clk@plt>
lea    0xecd(%rip),%rsi
mov    $0x1,%edi
mov    %ebx,%edx
mov    %ebp,%ecx
call   1040 <eplike_fixup_uart_clk@plt>
lea    0xed1(%rip),%rsi
mov    $0x2,%edi
mov    %ebx,%edx
mov    %ebp,%ecx
add    $0x8,%rsp
pop    %rbx
pop    %rbp
jmp    1040 <eplike_fixup_uart_clk@plt>

LLVM IR (-O0):
@.str = [25 x i8] c"/plb/opb/serial@f0000200\00"
@.str.1 = [25 x i8] c"/plb/opb/serial@f0000300\00"
@.str.2 = [25 x i8] c"/plb/opb/serial@f0000600\00"
define void @ibm440spe_fixup_clocks(i32 %0, i32 %1, i32 %2) {
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
store i32 %0, i32* %4
store i32 %1, i32* %5
store i32 %2, i32* %6
%8 = load i32, i32* %4
%9 = load i32, i32* %6
%10 = call i32 @__ibm440eplike_fixup_clocks(i32 %8, i32 %9, i32 1)
store i32 %10, i32* %7
%11 = load i32, i32* %5
%12 = load i32, i32* %7
%13 = call i32 @eplike_fixup_uart_clk(i32 0, i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str, i64 0, i64 0), i32 %11, i32 %12)
%14 = load i32, i32* %5
%15 = load i32, i32* %7
%16 = call i32 @eplike_fixup_uart_clk(i32 1, i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.1, i64 0, i64 0), i32 %14, i32 %15)
%17 = load i32, i32* %5
%18 = load i32, i32* %7
%19 = call i32 @eplike_fixup_uart_clk(i32 2, i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.2, i64 0, i64 0), i32 %17, i32 %18)
ret void
}

LLVM IR (-O2):
@.str = [25 x i8] c"/plb/opb/serial@f0000200\00"
@.str.1 = [25 x i8] c"/plb/opb/serial@f0000300\00"
@.str.2 = [25 x i8] c"/plb/opb/serial@f0000600\00"
define void @ibm440spe_fixup_clocks(i32 %0, i32 %1, i32 %2) {
%4 = tail call i32 @__ibm440eplike_fixup_clocks(i32 %0, i32 %2, i32 1)
%5 = tail call i32 @eplike_fixup_uart_clk(i32 0, i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str, i64 0, i64 0), i32 %1, i32 %4)
%6 = tail call i32 @eplike_fixup_uart_clk(i32 1, i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.1, i64 0, i64 0), i32 %1, i32 %4)
%7 = tail call i32 @eplike_fixup_uart_clk(i32 2, i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.2, i64 0, i64 0), i32 %1, i32 %4)
ret void
}